<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!doctype html>
<html lang="zh">
<head>
    <title>新增菜单</title>
    <%@include file="/common/header.jspf" %>
    <script type="text/javascript">
        var pageParentId = '${pageParentId}';
    </script>
    <script type="text/javascript" src="${ctx}/resources/js/permission/resource/add.js"></script>
</head>
<body>
<div class="form-wrap">
    <form id="resourceForm" method="post">
        <input type="hidden" id="parentId" name="parentId" value="${pageParentId}"/>
        <div class="input-wrap">
            <label class="label-top">上级菜单:</label>
            <input class="easyui-textbox" type="text" id="parentText" value=""
                   data-options="editable:false">
        </div>
        <div class="input-wrap">
            <label class="label-top">菜单名称:</label>
            <input class="easyui-textbox" type="text" name="name" data-options="required:true">
        </div>
        <div class="input-wrap">
            <label class="label-top">菜单标识:</label>
            <input class="easyui-textbox" type="text" name="code" data-options="required:true,validType:'checkCode'">
            <label style="display:none;color: red" id="code_err">当前标识已存在！</label>
        </div>
        <div class="input-wrap">
            <label class="label-top">菜单地址:</label>
            <input class="easyui-textbox" name="resUrl" >
        </div>
        <div class="input-wrap">
            <label class="label-top">菜单类型:</label>
            <select class="easyui-combobox" name="resType"
                    data-options="required:true,editable:false,selectOnNavigation:true">
                <option value="0">目录</option>
                <option value="1">菜单</option>
                <option value="2">按钮</option>
            </select>
        </div>
        <div class="input-wrap">
            <label class="label-top">按钮样式:</label>
            <input class="easyui-textbox" name="btnStyle">
        </div>
        <div class="input-wrap">
            <label class="label-top">启用状态:</label>
            <select class="easyui-combobox" name="useState"
                    data-options="required:true,editable:false,selectOnNavigation:true">
                <option value="1">启用</option>
                <option value="0">未启用</option>
            </select>
        </div>
        <div class="input-wrap">
            <label class="label-top">排序数字:</label>
            <input class="easyui-numberspinner formInput" value="0" name="sort">
        </div>
        <div class="input-wrap">
            <label class="label-top">备注:</label>
            <input class="easyui-textbox" type="text" name="remarks" data-options="multiline:true">
        </div>
    </form>
    <div class="form-button">
        <a href="javascript:void(0)" onclick="submitForm()" class="easyui-linkbutton"
           data-options="iconCls:'fa fa-save fa-lg'">保存</a>
        <a href="javascript:void(0)" onclick="clearForm()" class="easyui-linkbutton"
           data-options="iconCls:'fa fa-remove fa-lg'">清空</a>
    </div>
</div>
</body>
</html>
